package com.first.kafka;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author fanchaoqiang
 * @description  kafka 消费者
 * @date 2021/4/20 12:13 下午
 */
@Component
@Slf4j
public class KafkaConsumer  {




    //kafka监听信息
    @KafkaListener(topics = "test")
    public void deviceStatus(String msg){
        System.out.println("已经监听到了信息"+msg);
    }













}
